package com.itlong.cloud.operate.dao;

import com.github.pagehelper.Page;
import com.itlong.cloud.POJO.PO.OperateScenePO;
import com.itlong.cloud.POJO.VO.operate.OperateSceneVO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Map;

/**
 * <desc>
 * 场景信息数据访问接口
 * </desc>
 *
 * @createDate 2021-03-25
 */
@Mapper
@Repository
public interface IOperateSceneDao extends IAbstractBaseDao<OperateScenePO> {

    /**
     * <desc>
     * 添加场景
     * <desc/>
     *
     * @param params 保存参数
     * @return
     * @author zhouchun
     * @createDate 2021-03-25
     */
    Integer save(Map<String, Object> params);

    Integer getCountByName(String name);

    Integer getExcludeCountByName(@Param("name")String name, @Param("sceneKey")String sceneKey);

    /**
     * <desc>
     * 分页查询场景信息列表
     * <desc/>
     *
     * @param params 查询参数
     * @return
     * @author zhouchun
     * @createDate 2021-03-26
     */
    Page<OperateSceneVO> getSimplePage(Map<String, Object> params);

    OperateScenePO getOneBySceneId(String sceneId);

    Integer update(OperateScenePO m);

}